import { fetchGet, fetchPost, fetchFile} from "../utils/http.js";

export const fnGetSyTab = (param) => {
  return fetchPost("Goods/orderNum", param);
};

export const fnGetSyTabNew = (param) => {
  return fetchPost("Goods/orderNumNew", param);
}

export const fnGetSyRecord = (param) => {
  return fetchPost("Goods/orderLog", param);
};

export const fnGetRecordDetail = (param) => {
  return fetchPost("Goods/orderDetail", param)
}

export const fnGetChat = (param) => {
  return fetchGet("Goods/chat", param)
}

export const fnSendChat = (param) => {
  return fetchFile("Goods/chat", param)
}

export const fnOrderUpdate = (param) => {
  return fetchPost("Goods/orderUpdate", param)
}

// 填写订单号和足迹图
export const fnOrderUpdateOrderNum = (param) => {
  return fetchPost("Goods/orderUpdate", param)
}

export const fnCheckShopName = (param) => {
  return fetchPost("Goods/storename", param)
}

export const fnCheckShopTitle = (param) => {
  return fetchPost("Goods/biaoti", param)
}

export const fnChangeKeyword = (param) => {
  return fetchPost("Goods/keyword", param)
}

export const fnUploadComment = (file) => {
  return fetchFile("Goods/orderUpdate", file)
}

export const fnGetCzRecord = (param) => {
  return fetchPost("Goods/operateLog", param)
}

// 填写评价
export const fnOrderComment = (param) => {
  return fetchFile("Goods/comment", param)
}

// 修改下单价
export const fnUpdatePrice = (param) => {
  return fetchPost("Goods/priceUpdate", param)
}

// 上传图片
export const fnUploadImage = (param) => {
  return fetchFile("Goods/orderImage", param)
}

export default {
  fnGetSyTab,
  fnGetSyTabNew,
  fnGetSyRecord,
  fnGetRecordDetail,
  fnOrderUpdate,
  fnCheckShopName,
  fnChangeKeyword,
  fnUploadComment,
  fnGetCzRecord,
  fnOrderUpdateOrderNum,
  fnOrderComment,
  fnGetChat,
  fnSendChat,
  fnUpdatePrice,
  fnUploadImage,
  fnCheckShopTitle
}
